from utils.exception_util import get_exception
def is_empty(value):
    if value is None:
        return True
    elif isinstance(value, (str, list, dict, tuple, set)):
        return not bool(value)
    else:
        return False


def is_not_empty(value):
    return not bool(is_empty(value))

def assert_util_is_true(flag,code):
    if flag is False:
        return
    raise get_exception(code)
def assert_util_is_false(flag,code):
    if flag is True:
        return
    raise get_exception(code)